package software.lib.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by Wang on 2017/5/3.
 */
@Entity
@Table(name = "UserInfo")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="user_type")
public class User implements Serializable {
    @Id
    @Column(length = 18,nullable = false)
    protected String idCard;

    @Column(length = 30,nullable = false)
    protected String name;

    @Column
    protected boolean sex;//男子为true 女子为false

    @Column(length = 30,unique = true,nullable = false)
    protected String loginName;

    @Column(length = 30,nullable = false)
    protected String loginPassword;

    @Column(length = 30)
    protected String phone;

    @Column
    protected String address;

    @Column(length = 10)
    protected String zipcode;


    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isSex() {
        return sex;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLoginPassword() {
        return loginPassword;
    }

    public void setLoginPassword(String loginPassword) {
        this.loginPassword = loginPassword;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getZipcode() {
        return zipcode;
    }

    public void setZipcode(String zipcode) {
        this.zipcode = zipcode;
    }

}
